home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Configuration
- Caption = "Jim & Don's Screensaver Setup"
- ClientHeight = 4176
- ClientLeft = 4620
- ClientTop = 2424
- ClientWidth = 3648
- Height = 4500
- Icon = "Config.frx":0000
- Left = 4572
- LinkTopic = "Form2"
- ScaleHeight = 4176
- ScaleWidth = 3648
- Top = 2148
- Width = 3744
- Begin VB.PictureBox Picture2
- Appearance = 0 'Flat
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- BackColor = &H80000005&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 2088
- Index = 0
- Left = 4000
- Picture = "Config.frx":030A
- ScaleHeight = 174
- ScaleMode = 3 'Pixel
- ScaleWidth = 189
- TabIndex = 9
- Top = 45
- Visible = 0 'False
- Width = 2268
- End
- Begin VB.PictureBox Picture2
- Appearance = 0 'Flat
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- BackColor = &H80000005&
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 2088
- Index = 1
- Left = 4000
- Picture = "Config.frx":44CC
- ScaleHeight = 174
- ScaleMode = 3 'Pixel
- ScaleWidth = 189
- TabIndex = 8
- Top = -15
- Visible = 0 'False
- Width = 2268
- End
- Begin VB.PictureBox Picture2
- Appearance = 0 'Flat
- AutoRedraw = -1 'True
- AutoSize = -1 'True
- BorderStyle = 0 'None
- ForeColor = &H80000008&
- Height = 2172
- Index = 2
- Left = 4000
- ScaleHeight = 181
- ScaleMode = 3 'Pixel
- ScaleWidth = 199
- TabIndex = 7
- Top = 1020
- Visible = 0 'False
- Width = 2388
- End
- Begin VB.PictureBox Picture1
- Appearance = 0 'Flat
- BackColor = &H80000005&
- ForeColor = &H80000008&
- Height = 1356
- Left = 900
- ScaleHeight = 1332
- ScaleWidth = 1824
- TabIndex = 6
- Top = 324
- Width = 1848
- End
- Begin VB.Timer Timer1
- Interval = 400
- Left = 3204
- Top = 3468
- End
- Begin VB.CommandButton CmdCancel
- Caption = "&Cancel"
- Height = 432
- Left = 1944
- TabIndex = 5
- Top = 3552
- Width = 1200
- End
- Begin VB.CommandButton CmdOK
- Caption = "&OK"
- Height = 432
- Left = 492
- TabIndex = 4
- Top = 3552
- Width = 1200
- End
- Begin VB.Image Image1
- Height = 2175
- Left = 675
- Top = 105
- Width = 2385
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = "Large"
- Height = 255
- Index = 2
- Left = 2595
- TabIndex = 3
- Top = 2745
- Width = 930
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = "Small"
- Height = 252
- Index = 1
- Left = 216
- TabIndex = 2
- Top = 2760
- Width = 936
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = "Size of Circles"
- Height = 252
- Index = 0
- Left = 1092
- TabIndex = 1
- Top = 2424
- Width = 1596
- End
- Begin ComctlLib.Slider Slider1
- Height = 315
- Left = 615
- TabIndex = 0
- Top = 3000
- Width = 2385
- _Version = 65536
- _ExtentX = 4212
- _ExtentY = 550
- _StockProps = 64
- LargeChange = 1
- Max = 9
- Min = 1
- SelStart = 5
- Value = 5
- End
- Attribute VB_Name = "Configuration"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- 'For information about this program see the declarations
- 'section of the JDSaver.BAS module.
- 'This form is used to configure the program, and is called
- 'from Sub Main when the program is started with
- 'the /c command parameter
- Option Explicit
- Private Sub CmdCancel_Click()
- 'Exit without saving any changes
- Unload Me
- End Sub
- Private Sub CmdOK_Click()
- 'This will save the current Circle size to
- 'HKEY_CURRENT_USER\Software\VB and VBA Program Settings
- 'in the registry.
- SaveSetting "Samples", "JD Screen Saver", "Size", Size
- Unload Me
- End Sub
- Private Sub Form_Load()
- Dim nRet As Long
- 'Make this form a TOPMOST window, so it won't get lost under
- 'the Display Properties window.
- 'tempLong = SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
- 'Adjust the form height for resolution dependency.
- Height = Picture2(0).Height * 2
- '-----------------------------
- 'Build the monitor image
- '-----------------------------
- 'Set the final picture box to match the size of the
- 'ones containing the picture elements
- Picture2(2).Move Picture2(0).Left, Picture2(0).Top, Picture2(0).Width, Picture2(0).Height
- nRet = BitBlt(Picture2(2).hDC, 0&, 0&, Picture2(2).ScaleWidth, Picture2(2).ScaleHeight, Picture2(1).hDC, 0&, 0&, SRCAND)
- nRet = BitBlt(Picture2(2).hDC, 0&, 0&, Picture2(2).ScaleWidth, Picture2(2).ScaleHeight, Picture2(0).hDC, 0&, 0&, SRCINVERT)
- 'Move the picture to the actual image display,
- 'center it on the screen, and put the output in
- 'position.
- Image1.Picture = Picture2(2).Image
- Image1.Move (Width - Image1.Width) / 2, Image1.Top, Image1.Width, Picture2(0).Height
- Picture1.Move Image1.Left + 18 * xPixel, Image1.Top + 18 * yPixel, 153 * xPixel, 114 * yPixel
- 'Align other form elements vertically
- label1(0).Top = Image1.Top + Image1.Height + 8 * yPixel
- label1(1).Top = label1(0).Top + label1(0).Height
- label1(2).Top = label1(1).Top
- Slider1.Top = label1(1).Top + label1(1).Height
- CmdOK.Top = Slider1.Top + Slider1.Height + 10 * yPixel
- CmdCancel.Top = CmdOK.Top
- 'Copy a clone of the desktop into the picture box, to
- 'serve as a background for the preview
- CopyScreen Picture1
- Centerform Me
- 'Set the slider to the circle size.
- Slider1.value = Size
- End Sub
- Private Sub Slider1_Scroll()
- 'Size is a Public variable, used in the drawing routine
- Size = Slider1.value
- 'Start drawing again, using the new value
- Picture1.Cls
- End Sub
- Private Sub Timer1_Timer()
- 'Call the circle drawing routine, with output
- 'to this form's picture box.
- Draw Picture1
- End Sub
-